//
// Created by MaLei on 2022/10/27.
//

#include "peerconnection.h"
#include "rtc_base/physical_socket_server.h"
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/ssl_adapter.h"
#include "rtc_base/thread.h"
int main(int argc, char* argv[]) {
    rtc::InitializeSSL();
    rtc::LogMessage::LogToDebug(rtc::LoggingSeverity::LS_INFO);
    auto peer = rtc::make_ref_counted<Peer>();
    auto thread = rtc::Thread::Create();

    if(!thread->Start()){
        return -1;
    }

    thread->Invoke<void>(RTC_FROM_HERE, [&](){
        peer->Pull("");
    });



    while (1){ usleep(1);}

    return 0;
}